<?php
$query1="SELECT a.FilePath, a.Link,a.FileType FROM advertisement a WHERE a.IsDeleted=0 AND a.`Position`=2 ORDER BY a.CreatedDate desc LIMIT 0,1";//Bên phải
$query2="SELECT a.FilePath, a.Link,a.FileType FROM advertisement a WHERE a.IsDeleted=0 AND a.`Position`=3 ORDER BY a.CreatedDate desc LIMIT 0,1";//Bên trái
$result1=mysql_query($query1);
$result2=mysql_query($query2);
$urlImage='../Images/Advertisement/';
$left=mysql_fetch_assoc($result1);
$right=mysql_fetch_assoc($result2);
?>
<div id="floating_banner_left" style="text-align:right; position:absolute; overflow:hidden; top: 100px; left: 0px; width: 105px; border: 0px solid #000;">
<div id="floating_banner_left_content">
    <a href="<?php echo $left['Link']; ?>" target="_blank">
    <?php
	
	if($left['FileType']==0)
	{
	?>
    <img src="<?php echo $urlImage.$left['FilePath']; ?>" border="0" width="105px" alt="" />
    <?php
	}
	else
	{
	?>
    <object width="105"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
    <param value="quangcao/qc1.swf" name="movie">
    <param value="high" name="quality">
    <embed width="105"  type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" quality="high" src="<?php echo $urlImage.$left['FilePath']; ?>">
    </object>
    <?php }?>
    </a><br />
</div>
</div>



<div id="floating_banner_right" style="text-align:left; position:absolute; overflow:hidden; top: 100px; right: 0px; width: 105px; border: 0px solid #000;">
	<div id="floating_banner_right_content"  >
    <a href="<?php echo $right['Link']; ?>" target="_blank">
    <?php
	
	if($right['FileType']==0)
	{
	?>
    <img src="<?php echo $urlImage.$right['FilePath']; ?>" border="0" width="105px" alt="" />
    <?php
	}
	else
	{
	?>
    <object width="105"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
    <param value="quangcao/qc1.swf" name="movie">
    <param value="high" name="quality">
    <embed width="105"  type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" quality="high" src="<?php echo $urlImage.$right['FilePath']; ?>">
    </object>
    <?php }?>
    </a><br />
</div>
</div>
<!--<script>
	runQuery();
</script> -->
<script>
	pepsi_floating_init();
</script>
	
